package com.andy.common.db.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 * Author:Andy
 * Date:2023/3/21 15:28
 * Description:UserEntity
 * Room测试代码，会删除
 */
@Entity(tableName = "user_table")
data class UserEntity(
    @ColumnInfo(name = "name")
    val name: String,
    @ColumnInfo(name = "age")
    val age: Int,
    @ColumnInfo(name = "phoneNumber")
    val phoneNumber: String,
    @ColumnInfo(name = "imageUrl")
    val imageUrl: String
) {
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    var id: Long = 0
    override fun toString(): String {
        return "UserEntity(name='$name', age=$age, phoneNumber='$phoneNumber', imageUrl='$imageUrl', id=$id)"
    }
}
